package com.huifaapp.mall.adapter;

import android.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.huifaapp.mall.fragment.TmallShopkeepr_DetailFragment;
import com.huifaapp.mall.fragment.TmallShopkeepr_DetailFragment2;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by duanyu on 2017/12/29.
 */

public class TnallShopkeeperDetaAdapter  extends FragmentPagerAdapter{
    private List<String>list;

    public TnallShopkeeperDetaAdapter(FragmentManager fm, List<String> list) {
        super(fm);
        this.list = list;
    }

    @Override
    public android.support.v4.app.Fragment getItem(int position) {
        TmallShopkeepr_DetailFragment TmallShopkeepr_DetailFragment=new TmallShopkeepr_DetailFragment();
        TmallShopkeepr_DetailFragment2 TmallShopkeepr_DetailFragment2=new TmallShopkeepr_DetailFragment2();
        List<android.support.v4.app.Fragment>fragments=new ArrayList<>();
        fragments.add(TmallShopkeepr_DetailFragment);
        fragments.add(TmallShopkeepr_DetailFragment2);
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return list.get(position);
    }
}
